using Assets.Scripts.GDK;
using System;
using System.Collections.Generic;

namespace Brick
{
	public class GameGuideModule : gdk_base_Imodule
	{
		public void showGuide(int guideID, Action callback = null)
		{
			GameGuideModel guideID2GameGuideModel = getGuideID2GameGuideModel(guideID);
			if (guideID2GameGuideModel == null)
			{
			}
		}

		public GameGuideModel getIndex2GameGuideModel(int index)
		{
			GameGuideModel[] gameGuideArray = GameGuideData.gameGuideArray;
			foreach (GameGuideModel gameGuideModel in gameGuideArray)
			{
				int index2 = gameGuideModel.index;
				if (index == index2)
				{
					return gameGuideModel;
				}
			}
			return null;
		}

		public GameGuideModel getGuideID2GameGuideModel(int guideID)
		{
			GameGuideModel[] gameGuideArray = GameGuideData.gameGuideArray;
			foreach (GameGuideModel gameGuideModel in gameGuideArray)
			{
				int guideID2 = gameGuideModel.guideID;
				if (guideID == guideID2)
				{
					return gameGuideModel;
				}
			}
			return null;
		}

		public void setGameGuideModelArray(GameGuideModel[] gameGuideArray)
		{
			List<int> guideEndList = GameGuideData.guideEndList;
			for (int i = 0; i < guideEndList.Count; i++)
			{
				int num = guideEndList[i];
				foreach (GameGuideModel gameGuideModel in gameGuideArray)
				{
					int guideID = gameGuideModel.guideID;
					if (num == guideID)
					{
						gameGuideModel.end = true;
					}
				}
			}
			GameGuideData.gameGuideArray = gameGuideArray;
		}

		public void endGuide(int guideID)
		{
			List<int> guideEndList = GameGuideData.guideEndList;
			if (!guideEndList.Contains(guideID))
			{
				guideEndList.Add(guideID);
				GameGuideData.guideEndList = guideEndList;
			}
			GameGuideModel[] gameGuideArray = GameGuideData.gameGuideArray;
			foreach (GameGuideModel gameGuideModel in gameGuideArray)
			{
				int guideID2 = gameGuideModel.guideID;
				if (guideID == guideID2)
				{
					gameGuideModel.end = true;
				}
			}
		}
	}
}

